﻿uniform sampler2D SourceMap;
uniform sampler2D KeyMap;

void main(){

	float k = texture2D( KeyMap,gl_TexCoord[0].st).r;

	if(k>0.5){

		gl_FragColor = texture2D( SourceMap,gl_TexCoord[0].st );

	}else{

		discard;
		return;

	}

}
